<template>
<div class="status-radio">
    <status-tip @tap='select' :type='val.status' :checked='status === val.status' v-for="(val, key) in statusConfig" :key='key'>
    </status-tip>
</div>
</template>

<script>
import statusTip from '@/components/statusTip'
import getStatus, {statusConfig}  from '@/utils/tagStatus'

export default {

    props: {
        value: {
            default: 'default',
        }
    },
    data: function() {	
        return {
            status: '',
            statusConfig: statusConfig
        }
    },
    watch:{
        value (newVal, oldVal){
            this.status= newVal;
        }
    },
    components:{
        'status-tip': statusTip
    },
    methods: {
        select(data){
            this.status = data.status;
            this.$emit('change', this.status)
        }
    },
    created(){
        this.status = this.value;
    }
}
</script>

<style scoped lang='less'>
</style>